const express = require('express');
const bodyParser = require('body-parser');
const loginRoute = require('./src/api/login');
const registerRoute = require('./src/api/register');
const cors = require('cors');

const app = express();
const PORT = 4000;

app.use(bodyParser.json());
app.use(cors());
app.use('/api', loginRoute);
app.use('/api', registerRoute);

app.listen(PORT, () => {
  console.log(`Server is running on http://localhost:${PORT}`);
});